//
//  JPFDatePickerView.h
//  JPFFramework
//
//  Created by JPFei on 2018/7/24.
//  Copyright © 2018年 JPF All rights reserved.
//

#import <UIKit/UIKit.h>
#import "JPFToolbar.h"

typedef enum{
    JPFDateStyleShowYearMonthDayHourMinuteSecond  = 0,
    JPFDateStyleShowYearMonthDayHourMinute,
    JPFDateStyleShowYearMonthDay,
    JPFDateStyleShowYearMonth,
    JPFDateStyleShowMonthDayHourMinute,
    JPFDateStyleShowMonthDay,
    JPFDateStyleShowHourMinuteSecond,
    JPFDateStyleShowHourMinute
}JPFDateStyle;


NS_ASSUME_NONNULL_BEGIN

@interface JPFDatePickerView : UIView

@property (nonatomic,strong)UIColor * _Nullable doneButtonColor;//按钮颜色

@property (nonatomic, strong) NSDate * _Nullable maxLimitDate;//限制最大时间（没有设置默认9999）
@property (nonatomic, strong) NSDate * _Nullable minLimitDate;//限制最小时间（没有设置默认0）
@property (nonatomic, strong) NSDate * _Nullable scrollToDate;//滚到指定日期

- (instancetype)initWithDateStyle:(JPFDateStyle)datePickerStyle completeBlock:(void(^_Nullable)(NSDate *))completeBlock;
- (instancetype)initWithDateStyle:(JPFDateStyle)datePickerStyle nibName:(NSString *)nibName completeBlock:(void(^_Nullable)(NSDate *))completeBlock;

- (void)show;


#pragma mark - xib
@property (weak, nonatomic) IBOutlet UIView * _Nullable buttomView;
@property (weak, nonatomic) IBOutlet UILabel * _Nullable showYearView;
@property (weak, nonatomic) IBOutlet UIButton * _Nullable doneBtn;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * _Nullable bottomConstraint;
/** 工具器 */
@property (nonatomic, strong, nullable) JPFToolbar *toolBar;

- (IBAction)btnCancelAction:(UIButton *_Nullable)btn;
- (IBAction)btnDoneAction:(UIButton *_Nullable)btn;


@end

NS_ASSUME_NONNULL_END
